/**
 * 
 */
package com.fish.service.impl.product;

import java.util.List;

import com.fish.common.constant.QueryPage;
import com.fish.product.dao.ProductDAO;
import com.fish.product.po.Product;
import com.fish.service.product.ProductService;

/**
 * @author zhangzhenhua
 *
 */
public class ProductServiceImpl implements ProductService {
	private ProductDAO productDAO;
	
	@Override
	public Product queryProductByPrimaryKey(String productId) {
		return productDAO.queryProductByPrimaryKey(productId);
	}

	/* (non-Javadoc)
	 * @see com.fish.service.product.ProductService#addProduct(com.fish.product.po.Product)
	 */
	@Override
	public void addProduct(Product product) {
		productDAO.addProduct(product);
	}

	/* (non-Javadoc)
	 * @see com.fish.service.product.ProductService#updateProduct(com.fish.product.po.Product)
	 */
	@Override
	public void updateProduct(Product product) {
		productDAO.updateProduct(product);
	}

	/* (non-Javadoc)
	 * @see com.fish.service.product.ProductService#queryProductByObject(com.fish.product.po.Product)
	 */
	@Override
	public List<Product> queryProductByObject(Product product) {
		return productDAO.queryProductByObject(product);
	}

	public void setProductDAO(ProductDAO productDAO) {
		this.productDAO = productDAO;
	}

	@Override
	public Long queryProductCountByObject(Product product) {
		return this.productDAO.queryPorductCountByObject(product);
	}

	@Override
	public List<Product> queryProductByObject(Product product, QueryPage queryPage) {
		return this.productDAO.queryProductByObject(product,queryPage);
	}

}
